<!-- List of User -->
<div class="tab-pane active">
	<div class="iWidgets" align="center">
		<a class="iWidget" rel="tipsyN" href="/user/add" original-title="Add new user">
			<img alt="Add new user" src="<?php echo base_url() ?>assets/img/icons/24x24/add.png">
		</a>
		<a class="iWidget" rel="tipsyN" href="/user/profile" original-title="Your profile">
			<img alt="Your profile" src="<?php echo base_url() ?>assets/img/icons/24x24/heart.png">
		</a>
	</div>
	<div class="divider"><div><span></span></div></div>
	<div class="dataTables_wrapper" role="grid">
		<table cellspacing="0" border="0" class="dTable dataTable" cellpading="0" id="list_all_user">
			<thead align="left">
				<tr role="row">
					<th rowspan="2" style="width: 14px;" align="center">
						ID
					</th>
					<th rowspan="2">
						<i class="icon-user"></i>
						User
					</th>
					<th rowspan="2">
						Display Name
					</th>
					<th rowspan="2">
						<i class="icon-envelope"></i>
						Email
					</th>
					<th rowspan="2" align="center">
						<i class="icon-star"></i>
						Role
					</th>
					<th rowspan="2" align="center">
						<i class="icon-flag"></i>
						Status 
					</th>
					<th rowspan="2" align="center">
						<i class="icon-time"></i>
						Last Login
					</th>
					<th align="center" colspan="2">
						<i class="icon-cog"></i>
					</th>
				</tr>
				<tr>
					<td></td>
					<td></td>
				</tr>
			</thead>
			<tbody>
				<?php 
					foreach($users as $u): 
						$role = $u->role == 1 ? 'User' : ($u->role == 2 ? 'Editor' : 'Admin');
						$role_img = $u->role == 1 ? 'bAutumn' : ($u->role == 2 ? 'bAutumn' : 'bOlive');
						$status = $u->status == 1 ? 'Active' : 'Deactive';
						$status_img = $u->status == 1 ? 'heart4' : 'stop';
						$lst_login = $u->login == 0 ? 'Not Login Yet' : date('d M Y - H:i', $u->login);
				?>
				<tr class="new even <?php echo $currUser['id'] == $u->id ? 'bLeft' : '' ?>" id="userRow_<?=$u->id ?>" >
					<td align="center">
						<?=$u->id ?>
					</td>
					<td>
						<?=$u->user ?>
					</td>
					<td>
						<?=$u->f_name ?> <?=$u->l_name ?>
					</td>
					<td>
						<?=$u->email ?>
					</td>
					<td align="center">
						<span class="label <?=$role_img ?>"><?=$role ?></span>
					</td>
					<td align="center">
						<a rel="tipsyN" href="#" original-title="<?=$status ?> User">
							<img alt="" src="<?php echo base_url() ?>assets/img/icons/14x14/<?=$status_img ?>.png">
						</a>
					</td>
					<td align="center">
						<?=$lst_login?>
					</td>
					<td align="center" >
						<a rel="tipsyN" href="<?php echo base_url()?>user/edit/<?=$u->id?>" original-title="Edit User">
							<img alt="" src="<?php echo base_url() ?>assets/img/icons/14x14/pen4.png">
						</a>
					</td>
					<td align="center">
						<?php if($currUser['id'] != $u->id) { ?>
							<a href="#" id="removeUser_<?= $u->id ?>" rel="<?=$u->user ?>" class="removeUser" original-title="Delete User">
								<img alt="" src="<?php echo base_url() ?>assets/img/icons/14x14/trash.png">
							</a>
						<?php } ?>
					</td>
				</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
	</div>
</div>